﻿using System;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Serialization;

namespace openSourceC.DaylifeClient
{
	/// <summary>
	///		Summary description for Response.
	/// </summary>
	[Serializable]
	[XmlRoot("response")]
	public class Response
	{
		/// <summary>Gets or sets the response code.</summary>
		[XmlElement("code")]
		public int? Code { get; set; }

		/// <summary>
		///		Gets a <see cref="Nullable&lt;ResponseCodeEnum&gt;"/> representation of <see cref="P:Code"/>.
		///	</summary>
		[XmlIgnore]
		public ResponseCodeEnum? CodeEnum
		{
			get { return (ResponseCodeEnum?)Code; }
		}

		/// <summary>Gets or sets the response message.</summary>
		[XmlElement("message")]
		public string Message { get; set; }

		/// <summary>Gets or sets the payload.</summary>
		[XmlElement("payload")]
		public Payload Payload { get; set; }


		/// <summary>Gets or sets the array of all the out-of-band elements.</summary>
		[XmlAnyElement]
		public XmlElement[] ZElements { get; set; }
	}
}
